//模型创建 https://www.sequelize.com.cn/core-concepts/model-basics#%E5%AD%97%E7%AC%A6%E4%B8%B2

//分类
module.exports = ( sequelize, Sequelize ) => {
    return sequelize.define( "experience", {
        id: {
            type: Sequelize.UUID,
            notNull: true,
            primaryKey: true,
            defaultValue: Sequelize.UUIDV4 // 或 DataTypes.UUIDV1
        },
        start_time: {
            type: Sequelize.STRING,
            comment: '开始时间',
        },
        end_time: {
            type: Sequelize.STRING,
            comment: '结束时间',
        },
        unit: {
            type: Sequelize.STRING,
            comment: '单位',
        },
        position: {
            type: Sequelize.STRING,
            comment: '职位',
        },
        type: {
            type: Sequelize.STRING, 
            comment: '类型',
            defaultValue: 1
        },
        show: {
            type: Sequelize.STRING,
            comment: '是否有效',
            defaultValue: 1
        },
    }, {
        tableName: 'experience'
    } );
};
